
<html>
	<head>
		<title>Demo of TreeView </title>
		<link href="css/layout.css" rel="stylesheet" type="text/css" />
		<link href="../src/css/treeview.css" rel="stylesheet" type="text/css" />
		<link href="../src/css/toolbar.css" rel="stylesheet" type="text/css" />
		<link href="../src/css/uml.css" rel="stylesheet" type="text/css" />
		
		<script src="../src/js/base/g.js"> </script> 
		<script src="../src/js/utils/list.js"> </script> 
		<script src="../src/js/utils/tree.js"> </script> 
		<script src="../src/js/uml/uml.js"> </script> 
		<script src="../src/js/base/dom.js"> </script> 
		<script src="../src/js/widget/scrollbar.js"> </script> 
		<script src="../src/js/widget/datasource.js"></script>
		<script src="../src/js/widget/treeview.js"></script>
		<script src="../src/js/widget/toolbar.js"></script>
		<script>
			function toolbar_init() {
				var tbar = new G.Widget.ToolBar(
					[
						{name: 'action', img: '../src/css/images/uml/actor.gif', title: 'Actor'},
						{name: 'usecase', img: '../src/css/images/uml/usecase.gif', title: 'UseCase'},
						{name: null, img: null, title: null},
						{name: 'action', img: '../src/css/images/uml/actor.gif', title: 'Actor'},
						{name: 'usecase', img: '../src/css/images/uml/usecase.gif', title: 'UseCase'}
					]
				);
				tbar.render('TOOL_BAR');

				var tbar_func = function(act) { alert(act)};

				tbar.bind('action', tbar_func);
				tbar.bind('usecase', tbar_func);
			}

			function demo_init() 
			{
				var tv = G('TEST_TREE').TreeView (null);

				var tree = new G.UML.Project('UML Demo Project');

				tv.link_data(tree.root);
				toolbar_init();
			}
		</script>
	</head>
	<body onload="demo_init()">
		<table class="layout" style="background:#FFF">
			<tr>
				<td colspan=2 id="head">
					<div id="FILE_BAR" style="width:200px;display:block;float:left;">AAA</div>
					<div id="TOOL_BAR"></div>
				</td>
			</tr>
			<tr>
				<td width="200px" id="left">
					<div class="treeview" id="TEST_TREE">
					</div>
				</td>
				<td id="center"></td>
			</tr>
			<tr>
				<td colspan=2 id="bottom"></td>
			</tr>
		</table>
	</body>
</html>
